package com.macrounion.atv.service.mapper;

import com.macrounion.atv.service.entity.Channel;
import com.macrounion.atv.service.entity.ProtocolC;
import com.macrounion.atv.service.service.ProtocolCService;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.HashMap;
import java.util.List;

@Mapper
public interface ChannelMapperExt {

    int findCount(@Param("deviceId")String deviceId, @Param("channelCode")String channelCode);

	Channel getByDeviceIdandChannelCode(@Param("deviceId")String deviceId, @Param("channelCode")String channelCode);

    int updateTranslate(Channel channel);

    int updateChannelCode(Channel channel);

    int batchUpdate(HashMap<String, Object> mapChannel);

    int clearChannelByDeviceId(@Param("deviceId") String deviceId);

    int initProtocolChannel(@Param("deviceId") String deviceId);

    int reductionChannelName(@Param("deviceId") String deviceId);

    List<Channel> getChannelList(@Param("deviceId") String deviceId, @Param("virtualId") String virtualId, @Param("searchStr") String searchStr);

    List<Channel> getChannelListByDevice(@Param("deviceId") String deviceId, @Param("searchStr") String searchStr, @Param("isVirtual") Boolean isVirtual);

    List<Channel> getChannelListByIds(@Param("ids") List<String> ids);

    Channel getVirtualChannel(@Param("virtualId") String virtualId);

    int removeByVirtualId(@Param("virtualId") String virtualId);

    List<ProtocolC> getRepeatChannelList(@Param("deviceId") String deviceId);

	List<Channel> getAll();

}